<template>
    <van-tabbar v-model="active" active-color="#FD7753" route>
        <van-tabbar-item v-for="item in tabArr" :to="`/${item.url}`">
            <span>{{item.name}}</span>
            <template #icon="props">
                <img :src="props.active ? require(`../assets/img/${item.url}_icon_act.png`) : require(`../assets/img/${item.url}_icon.png`)" />
            </template>
        </van-tabbar-item>
    </van-tabbar>
</template>

<script>
    export default {
        data() {
            return {
                active: 0,
                tabArr:[
                    {
                        name:'首页',
                        url:'home'
                    },
                    {
                        name:'岗位',
                        url:'job',
                    },
                    {
                        name:'我的',
                        url:'mine',
                    }
                ]
            };
        },
    };
</script>

<style lang="scss" scoped>

</style>